package com.wanxi.faceobject.template.test2;

//该类包括: private成员变量monthlySalary;
//提供必要的构造器;
//实现父类的抽象方法earnings(),该方法返@monthlySalary值;
//toString()方法输出员工类型信息及员工的name, number, birthday.
//比如: SalariedEmployee[name = ',number = , birthday=xxxx年Xx月xx日]
public class SalaryEmployee extends Employee {
    private double monthlySalary;

    public SalaryEmployee() {
    }

    @Override
    public double earnings() {
        return monthlySalary;
    }

    public SalaryEmployee(String name, int id, MyDate birthday, double monthlySalary) {
        super(name, id, birthday);
        this.monthlySalary = monthlySalary;
    }

//    public String getInfo() {
//        return "SalariedEmployee[" + super.getInfo() + "]";
//    }

}
